home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 September / PC-WELT 9-2001.ISO / software / hw / brennen / flask_src.exe / Audio / MPEG / MPEGDec.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-14  |  1.7 KB  |  56 lines

  1. /* 
  2.  *  MPEGDec.h  -  MPEG audio decoding
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000 - ultraflask@yahoo.com
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23.  
  24. #if !defined(AFX_MPEGDEC_H__A7F0FAE4_ECB5_11D3_A73C_00000100CF13__INCLUDED_)
  25. #define AFX_MPEGDEC_H__A7F0FAE4_ECB5_11D3_A73C_00000100CF13__INCLUDED_
  26.  
  27. #if _MSC_VER > 1000
  28. #pragma once
  29. #endif // _MSC_VER > 1000
  30.  
  31. #include "IAMPDecoder.h"
  32. #include "..\..\flaskmpeg.h"
  33.  
  34. #define FRAME_SAMPLES 1152
  35. class CMPEGDec : public IAMPBitsource
  36. {
  37.  
  38. public:
  39.     int read(void *buffer, int bytes);
  40.  
  41.     int decodeFrame( ui8 *pcm_samples, ui8 *frame_data, ui32 frame_size);
  42.     int Stop();
  43.     int Start();
  44.     CMPEGDec();
  45.     virtual ~CMPEGDec();
  46. private:
  47.     short       temp_buffer[FRAME_SAMPLES*2];
  48.     int         in_ptr;
  49.     int         frame_size;
  50.     ui8        *frame_data;
  51.     IAMPDecoder *decoder;
  52.  
  53. };
  54.  
  55. #endif // !defined(AFX_MPEGDEC_H__A7F0FAE4_ECB5_11D3_A73C_00000100CF13__INCLUDED_)
  56.